package com.battery.system.service;

import java.util.List;

import com.battery.common.core.domain.AjaxResult;
import com.battery.system.domain.BO.WithdrawalBO;
import com.battery.system.domain.VO.WithdrawalVO;
import com.battery.system.domain.Withdrawal;

/**
 * 提现记录Service接口
 *
 * @author battery
 * @date 2021-03-18
 */
public interface IWithdrawalService {
    /**
     * 查询提现记录
     *
     * @param id 提现记录ID
     * @return 提现记录
     */
    public Withdrawal selectWithdrawalById(String id);

    /**
     * 查询提现记录列表
     *
     * @param withdrawal 提现记录
     * @return 提现记录集合
     */
    public List<Withdrawal> selectWithdrawalList(Withdrawal withdrawal);

    public List<Withdrawal> selectWithdrawalList(Withdrawal withdrawal, String end);

    /**
     * 新增提现记录
     *
     * @param withdrawal 提现记录
     * @return 结果
     */
    public int insertWithdrawal(Withdrawal withdrawal);

    /**
     * 修改提现记录
     *
     * @param withdrawal 提现记录
     * @return 结果
     */
    public int updateWithdrawal(Withdrawal withdrawal);

    /**
     * 批量删除提现记录
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteWithdrawalByIds(String ids);

    /**
     * 删除提现记录信息
     *
     * @param id 提现记录ID
     * @return 结果
     */
    public int deleteWithdrawalById(String id);

    /**
     * 展示提現列表
     *
     * @param withdrawalBO
     * @return
     */
    List<WithdrawalVO> selectWithdrawalVOList(WithdrawalBO withdrawalBO);


    /**
     * 提现审核通过，进行打款操作
     *
     * @param txId
     * @param type
     * @return
     */
    AjaxResult adoptTx(String txId, int type);

    /**
     * 需要查询该用户是否存在正在提现中的订单
     *
     * @param accountType
     * @param accountId
     * @return
     */
    Withdrawal selectOn(int accountType, String accountId);


    public void txErr(String txId, int accountType);
}
